package com.mall.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import com.mall.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mall.business.mapper.TUserSignMapper;
import com.mall.business.domain.TUserSign;
import com.mall.business.service.ITUserSignService;

/**
 * 用户签到Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-06
 */
@Service
public class TUserSignServiceImpl extends ServiceImpl<TUserSignMapper,TUserSign>  implements ITUserSignService
{
    @Autowired
    private TUserSignMapper tUserSignMapper;

    /**
     * 查询用户签到
     *
     * @param id 用户签到主键
     * @return 用户签到
     */
    @Override
    public TUserSign selectTUserSignById(String id)
    {
        return tUserSignMapper.selectTUserSignById(id);
    }

    /**
     * 查询用户签到列表
     *
     * @param tUserSign 用户签到
     * @return 用户签到
     */
    @Override
    public List<TUserSign> selectTUserSignList(TUserSign tUserSign)
    {
        return tUserSignMapper.selectTUserSignList(tUserSign);
    }

    /**
     * 新增用户签到
     *
     * @param tUserSign 用户签到
     * @return 结果
     */
    @Override
    public int insertTUserSign(TUserSign tUserSign)
    {
                tUserSign.setCreateTime(DateUtils.getNowDate());
            return tUserSignMapper.insertTUserSign(tUserSign);
    }

    /**
     * 修改用户签到
     *
     * @param tUserSign 用户签到
     * @return 结果
     */
    @Override
    public int updateTUserSign(TUserSign tUserSign)
    {
                tUserSign.setUpdateTime(DateUtils.getNowDate());
        return tUserSignMapper.updateTUserSign(tUserSign);
    }

    /**
     * 批量删除用户签到
     *
     * @param ids 需要删除的用户签到主键
     * @return 结果
     */
    @Override
    public int deleteTUserSignByIds(String[] ids)
    {
        return tUserSignMapper.deleteTUserSignByIds(ids);
    }

    /**
     * 删除用户签到信息
     *
     * @param id 用户签到主键
     * @return 结果
     */
    @Override
    public int deleteTUserSignById(String id)
    {
        return tUserSignMapper.deleteTUserSignById(id);
    }
}
